package com.mc.code.service.Impl;

import com.mc.code.entity.CodeSkill;
import com.mc.code.entity.CodeUserId;
import com.mc.code.entity.CodeUsers;
import com.mc.code.entity.Skill;
import com.mc.code.mapper.LoginMapper;
import com.mc.code.mapper.UsersMapper;
import com.mc.code.service.UsersService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class UsersImpl implements UsersService {

    @Autowired
    private UsersMapper usersMapper;

    @Override
    public List<CodeUsers> codeUsers(String userNo)
    {
        return  usersMapper.codeUsers(userNo);
    }

    @Override
    public void updateContact(CodeUsers codeUsers) {
        usersMapper.updateContact(codeUsers);
    }

    @Override
    public String nickName(int promulgatorId) {
        return usersMapper.nickname(promulgatorId);
    }

    @Override
    public List<CodeUserId> userId(String userNo) {
        return usersMapper.userId(userNo);
    }

    @Override
    public void updateImage(CodeUsers user) {
        usersMapper.updateImage(user);
    }

    @Override
    public List<CodeSkill> selectSkills() {
        return usersMapper.selectSkills();
    }

    @Override
    public List<Skill> selectGoodSkills(String userNo) {
        return usersMapper.selectGoodSkills(userNo);
    }

    @Override
    public void delSkill(Skill skill) {
        usersMapper.delSkill(skill);
    }

    @Override
    public void insertSkill(Skill skill) {
        usersMapper.insertSkill(skill);
    }

    @Override
    public double selectBanlance(String userNo) {
        return usersMapper.selectBanlance(userNo);
    }

    @Override
    public void recharge(double v,String userNo) {
        usersMapper.recharge(v,userNo);
    }

    @Override
    public int selectPayCondition(String userNo) {
        return usersMapper.selectPayCondition(userNo);
    }

    @Override
    public void updatePsd(String userNo, String psd) {
        usersMapper.updatePsd(userNo,psd);

    }


}
